/**
 *
 */

package com.moogene.saad.gameplay.city;

import com.moogene.android.InfoMediator;
import com.moogene.android.engine.mmi.ImageLayer;
import com.moogene.android.engine.mmi.Layer;
import com.moogene.android.engine.mmi.Page;
import com.moogene.saad.sns.Session;

/**
 * @author 28850924
 *
 */
public class CityPage extends Page {

    final static int FRIENDS_BAR_HEIGHT = 200;
    final static int GRAVATAR_WIDTH = 200;

    @Override
    public void onInit(String... args) {
    	addGravatar();
        addCity();
        addHuds();
    }

    /*
     * (non-Javadoc)
     *
     * @see com.moogene.android.engine.mmi.Page#onStart()
     */
    @Override
    public void onStart() {
        
    }

    private void addGravatar() {
        Layer layer = new ImageLayer(Session.getSession().getGravator(), GRAVATAR_WIDTH, GRAVATAR_WIDTH);
        layer.setLocation(0, 0);
        addLayer(layer);
    }

    private void addCity() {
        Layer city = new CityListLayer(InfoMediator.getScreenWidth() - FRIENDS_BAR_HEIGHT, InfoMediator.getScreenHeight() - FRIENDS_BAR_HEIGHT);
        city.setLocation(200, 0);
        addLayer(city);
    }

    private void addHuds() {
        addLayer(new FriendsBarLayer(InfoMediator.getScreenWidth(), FRIENDS_BAR_HEIGHT));
    }
}
